<!--
自定义组件，自定义间距有12px和16px两种，默认为12px，large是16px
-->
<template>
  <a-space :size="spaceSize" v-bind="$attrs">
    <slot> </slot>
  </a-space>
</template>

<script>
export default {
  name: 'rj-space',
  props: {
    size: {
      type: [Number, String],
      default: 12,
    },
  },
  components: {},
  data() {
    return {
      spaceSize: 12,
      slotArr: [],
    };
  },
  created() {
    if (this.size == 'large') {
      this.spaceSize = 16;
    } else if (this.size == 'middle') {
      this.spaceSize = 12;
    } else {
      this.spaceSize = this.size;
    }
  },
  mounted() {
    this.slotArr = Object.keys(this.$slots);
  },
};
</script>
